#include <stdio.h>
 
double Lerp(double x0,double y0,double x1,double y1,double x)
{
    double dy = y1 - y0;
    if(dy == 0){
        printf("除0错误！\n");
        return 0;
    }
    return x * (x1 - x0) / dy;
}

int main(int argc, char * argv[])
{
    double x0,x1,y1,y0,x,y;
    printf("Inptu [x0] [y0] [x1] [y1] [x]:");
    scanf("%lf %lf %lf %lf %lf",&x0,&y0,&x1,&y1,&x);
    y = Lerp(x0,y0,x1,y1,x);
    printf("y = %lf\n",y);
    return 0;
    return 0;
}
